﻿{* 
    This file is a template part of GameServerInfo.tpl
    Copyright (c) 2011, XBloks Progect 
*}
<link rel="stylesheet" href="{$BACKEND_CSS}dataTable.css"  rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{$BACKEND_CSS}Form.css"  rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{$BACKEND_CSS}Buttons.css"  rel="stylesheet" type="text/css" />
<link rel="stylesheet" href='{$BACKEND_CSS}osx.css'       type="text/css" media='screen' />
<link rel="stylesheet" href='{$BACKEND_CSS}modalWindow.css'       type="text/css" media='screen' />

<script type="text/javascript" src="{$BACKEND_JS}sliding.form.js"></script>
<script type="text/javascript" src="{$BACKEND_JS}adminsControl.js"></script>
<script type="text/javascript" src="{$BACKEND_JS}GameServersControl.js"></script>
<script src="{$EXTERNAL_JS}jquery/simplemodal/jquery.simplemodal.js"       type="text/javascript"></script> 
<script src="{$EXTERNAL_JS}jquery/simplemodal/osx.js"       type="text/javascript"></script>
<div  class="clear"> </div>
        <div id="Fcontent" style="width: 100%">
            <div id="wrapper">
            
                <div id="steps">
                   
                        <fieldset class="step">
                        <form>
                            <legend>
                                {$lang.block_title}
                            </legend>
                            
                            <div id="tableHolder">
                                <div id="tableActions">
                                <form>
                                    <div id="search" style="width: 635px;">
                                    <form name="search_form" action="{$form_action}" method="get">
                                  
                                        <table>
                                        <thead>
                                            <tr>
                                                <th width="115px;">
                                                    <select onchange="this.form.submit();" id="game" name="game" style="width:100px;">
                                                      <option  selected="true" value=""> All Games</option> 
                                                      {foreach from=$games item=item}
                                                            <option  {if $smarty.get.game ==  $item.code} selected="true" {/if} style="text-transform: uppercase;" value="{$item.code}">{$item.code}</option>  
                                                      {/foreach}                                          
                                                    </select>
                                                </th>
                                                <th width="115px;">
                                                    <select onchange="this.form.submit();" id="status" name="status" style="width:100px;">
                                                      <option  selected="true" value="0"> All Statuses</option> 
                                                      {foreach from=$statuses item=item}
                                                            <option {if $smarty.get.status ==  $item.id} selected="true" {/if} style="text-transform: uppercase;" value="{$item.id}">{$item.code}</option>  
                                                      {/foreach}                                          
                                                    </select>
                                                </th>
                                                <th width="115px;">
                                                    <select onchange="this.form.submit();" id="rank" name="rank" style="width:100px;">
                                                      <option  selected="true" value="0"> All Ranks</option> 
                                                      {foreach from=$ranks item=item}
                                                            <option {if $smarty.get.rank ==  $item.id} selected="true" {/if}  style="text-transform: uppercase;" value="{$item.id}">{$item.code}</option>  
                                                      {/foreach}                                          
                                                    </select>
                                                </th>
                                                <th><input name="search" type="text" value="{$search}" /></th>
                                                <th width="75px"><a  style="width:75px;" id="insert" class="medium green button" >{$lang.insert}</a> </th>
                                            </tr>
                                            </thead>
                                        </table>
                                    </form>
                                    </div>
                                    
                                    <div id="pages">
                                        <table>
                                        <thead>
                                            <tr>
                                                <th>{$lang.page}&nbsp;</th>
                                                <th style="padding-right:10px; padding-left:5px; ">
                                                    <form action="{$form_action}" name="listing" method="get">
                                                        <select onchange="this.form.submit();" name="page" style="width:50px;">
                                                            {section name=pages start=1 loop=$pages_count+1 step=1}
                                                                <option  {if $page == $smarty.section.pages.index} selected="true" {/if} value="{$smarty.section.pages.index}">{$smarty.section.pages.index}</option>                                           
                                                            {/section}
                                                        </select>
                                                    </form>
                                                </th>
                                                <th>&nbsp;{$lang.from}&nbsp;</th>
                                                
                                                <th>&nbsp;{$pages_count}&nbsp;</th>
                                                <th style="padding-left:10px;">{$prev_link}</th>
                                                <th style="padding-left:10px;">{$next_link}</th>
                                                
                                            </tr>
                                            </thead>
                                        </table>
                                    </div>
                                    
                                    
                                </form>
                                </div>
                                <div style="clear:both;"></div>
                                <table border="0" width="100%" cellspacing="1" cellpadding="0" class="dataTable">
                                  <thead>
                                    <tr>
                                      <th>{$lang.title}</th>
                                      <th>{$lang.type}</th>
                                      <th>{$lang.server_url}</th>
                                      <th>{$lang.file}</th>
                                      <th width="100" >{$lang.rank}</th>
                                      <th width="100" >{$lang.status}</th> 
                                      <th width="10" >{$lang.registred}</th>
                                      <th width="150">{$lang.table_heading_action}</th>
                                    </tr>
                                  </thead>
                                  <tfoot>
                                    <th colspan="8">
                                      <div style="float:left"> {$lang.total}:&nbsp;{$total_items}&nbsp;{$lang.items}</div>
                                      <div style="float:right">{$lang.table_tip}</div>
                                    </th>
                                  </tfoot>
                                  <tbody>
                                    {foreach from=$servers item=item name=row}
                                    <tr  class="{if $smarty.foreach.row.index mod 2 > 0} row1{else} row0{/if}">
                                      <td>{$server_icon}&nbsp; {$item.title}</td>
                                      <td>{$item.type}</td>
                                      <td><a href="{$item.url}">{$item.url}</a></td>
                                      <td>{$item.file}</td>
                                      <td>{if $item.rank == 1}  <span style="color: #EAC117"> {$lang.gold} </span> {else} {if $item.rank == 2}  <span style="color: #8BB381">{$lang.silver}  </span>{else} <span style="color: silver"> {$lang.bronze} </span> {/if} {/if}</td>
                                      <td>{if $item.status == 1} <span style="color: green">{$lang.approved} </span> {else} {if $item.status == 2} <span style="color: blue">{$lang.waiting} </span> {else} <span style="color: red">   {$lang.closed} </span> {/if} {/if}</td>
                                      <td align="center" style="padding: 0px 0px 0px 0px"  >{$item.added}</td>
                                      <td align="right">
                                      <a  id="info" href="{$item.info}" toptions="type = iframe, title = {$lang.server_info}, effect = fade, width = 900, height = 475, overlayClose = 1, layout = quicklook, x = 120, y= 120">{$info_icon} </a>
                                      &nbsp; <a href="#" onclick="trash('{$item.title}', '{$item.trash}');" class='osx'> {$delete_icon}</a>&nbsp;</td>
                                    </tr>
                                    
                                    {/foreach}
                                  </tbody>
                                </table>	
                            </div>
                        </form>
                        </fieldset>
                          
                        
                        
                </div>
                <div id="navigation" style="display:none;">
                    <ul>
                        <li class="selected">
                            <a href="#">{$lang.registred_servers}</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        
      </div>
  <div id="osx-modal-content">
    	<div id="osx-modal-title">{$lang.conf}</div>
        
    	<div class="close"><a href="#" class="simplemodal-close">x</a></div>
    	<div id="osx-modal-data">
    		<h2>{$lang.del_conf} <span id="item"></span>?</h2>
          <div id="blockButtons">
            <a style="width:80px;" id="delete" class="medium green button"  >{$lang.delete}</a> 
            <a style="width:80px;" class="medium red button simplemodal-close" >{$lang.cancel}</a> 
          </div>
    	</div>
    </div>